package day1108_2;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

public class Z3 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        ObjectInputStream  ois=new ObjectInputStream(
                new FileInputStream("1108obj.dat")
        );//1.

        Student  stu=(Student)ois.readObject();//2.
        System.out.println(stu.name);
        System.out.println(stu.age);

        ois.close();//3.
    }
}

